SlideshowView2

open class SlideshowView2 : AppCompatImageView, RevelControl, DownloadFeedTask2.OnCompleted, DownloadFileTask2.OnCompleted, DownloadImageTask2.OnCompleted, PlaceExchangeAdRequestTask.OnCompleted, VistarAdRequestTask.OnCompleted, PlayedHandler

A custom androidx.appcompat.widget.AppCompatImageView that displays a slideshow of images.

This view manages a playlist of Source items, typically images, and displays them sequentially with transitions. It supports various source types including local images, remote images, and integrations with ad services like VistarMedia and PlaceExchange. The slideshow can auto-advance based on intervals defined in the sources.

It implements RevelControl for integration into the RevelDigital player system, handling playback control, dynamic content updates (e.g., from ad services or RSS feeds), and event listening. It uses TransitionDrawable for smooth visual transitions between images.

Conditional playback of sources based on com.reveldigital.player.ConditionEvaluator is also supported.

See also

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet)
Constructor for inflating from XML.
constructor(context: Context, attrs: AttributeSet, defStyle: Int)
Constructor for inflating from XML with a default style.
constructor(context: Context, module: Module)
Constructor for programmatic creation.

Properties

Link copied to clipboard
open val isStarted: Boolean
Link copied to clipboard

Functions

Link copied to clipboard
Adds a PlaylistListener to receive callbacks for playlist events, such as when a source starts or completes.
Link copied to clipboard
open fun dispose()
Releases any resources held by this control and prepares it for removal or permanent deactivation.
Link copied to clipboard
open fun getName(): String
Gets the unique name assigned to this control.
Link copied to clipboard
open fun getOptions(): Iterator<out Option>
Gets an iterator over the configuration s for this control.
Link copied to clipboard
open fun getPlaylist(): Playlist
Gets the associated with this control, if any.
Link copied to clipboard
open fun getSource(): Source
Gets the currently active Source item being displayed or processed.
Link copied to clipboard
open fun getType(): ModuleType
Gets the type of the underlying module or content associated with this control.
Link copied to clipboard
open fun getZIndex(): Int
Gets the Z-index (stacking order) of this control.
Link copied to clipboard
open fun initialize(module: Module)
Initializes the control with its associated module context.
Link copied to clipboard
open fun isAutoStart(): Boolean
Checks if this control is configured to start its operation automatically after #initialize(Module) initialization.
Link copied to clipboard
open fun next()
Moves to the next source in the playlist.
Link copied to clipboard
open fun onAdRequestCompleted(response: AdResponse, sourceId: String)
Link copied to clipboard
open fun onDownloadFeedCompleted(feed: Feed)
Link copied to clipboard
open fun onDownloadFileCompleted(file: File)
Link copied to clipboard
open fun onDownloadImageCompleted(view: ImageView, bitmap: Bitmap)
Link copied to clipboard
open fun onQueryAdRequestCompleted(response: AdRequestResponse)
Link copied to clipboard
open fun previous()
Moves to the previous source in the playlist.
Link copied to clipboard
open fun registerPlayedListener(listener: PlayedListener)
Registers a listener to be notified when a source has been played.
Link copied to clipboard
Removes a previously added PlaylistListener.
Link copied to clipboard
open fun setAutoStart(flag: Boolean)
Sets whether this control should start its operation automatically after #initialize(Module) initialization.
Link copied to clipboard
open fun setSource(source: Source)
Sets and plays the specified Source from the playlist.
open fun setSource(idx: Int)
Sets and plays the source specified by its zero-based index in the playlist.
open fun setSource(source: Source, play: Boolean)
Sets the current Source.
open fun setSource(idx: Int, play: Boolean)
Sets the current source by its zero-based index in the playlist.
Link copied to clipboard
open fun start()
Starts or resumes the active operation of this control.
Link copied to clipboard
open fun startAt(source: Source)
Starts playing at the specified Source.
open fun startAt(idx: Int)
Starts playing at the specified playlist index.
Link copied to clipboard
open fun stop()
Stops or pauses the active operation of this control.